<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <!-- import CSS -->
  <link rel="stylesheet" href="../js/3rd/elementUi/index.css">
  <link rel="stylesheet" href="../css/pc.css">
  <script src="../js/3rd/elementUi/vue.js"></script>
  <script src="../js/3rd/jquery-3.1.1.min.js"></script>
</head>
<body>
  <div id="projectLists" class="project-lists">
    
	<el-container>
	  <el-aside class="sider-bar" id="siderbar">
      <div class="logo"><img src="../image/logo.jpg">来赚吧管理后台</div> 
	    <tp-siderbar title="发布项目"></tp-siderbar>
	  </el-aside>
    <el-main>
	  <div class="right-content">
      <el-breadcrumb separator-class="el-icon-arrow-right" class="bread-bd">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>众筹用户</el-breadcrumb-item>
      </el-breadcrumb>
      <!-- <a class="creat-btn" href="/admin/creatCrowdFunding.html">发布众筹</a> -->
      <template>
        <el-table
          :data="crowFundingUserListData"
          style="width: 100%">
          <el-table-column
            label="时间"
            width="180">
            <template slot-scope="scope">
              <span style="margin-left: 10px">{{ scope.row.createTime |formatData}}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="用户手机"
            width="230">
            <template slot-scope="scope">
              <span style="margin-left: 10px">{{ scope.row.userTelephone }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="用户姓名"
            width="180">
            <template slot-scope="scope">
              <span style="margin-left: 10px" v-if="scope.row.userRealName">{{ scope.row.userRealName }}</span>
              <span v-else>无</span>
            </template>
          </el-table-column>
          <el-table-column
            label="参加总价"
            width="180">
            <template slot-scope="scope">
              <span style="margin-left: 10px">￥{{scope.row.totalPrice}}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="参加的项目"
            >
            <template slot-scope="scope">
              <span style="margin-left: 10px">{{ scope.row.crowdfundingName}}</span>
            </template>
          </el-table-column>
        </el-table>
      </template> 

      <div class="clearfix"></div>
    </div>  
   </el-main>  
	</el-container>


  </div>
</body>


  <!-- import JavaScript -->
  <script src="../js/3rd/elementUi/index.js"></script>
  <script src="../js/js/admin_siderbar.js"></script>
  <script src="../js/js/common.js"></script>
  <script>
   var token=getCookie("userToken");
   var userId=getCookie("userId");
   if(!token||!userId){
      window.location.href = "/admin/login.html";
   }
    new Vue({
      el: '#projectLists',
      data: {
        crowFundingUserListData:[],
        selectStatusVal:'',
        selectRowContent:'',
        selectIndex:'',
      },
      created:function(){
         var getCrowFundingUserListUrl="/crowdfunding/getUsers";
         var crowFundingId=this.getUrlParam("id");
         var data={
                   id:crowFundingId
         }
         console.log(data)
         pushData(getCrowFundingUserListUrl,data,function(res){
             console.log(res)
             if(res.errorCode=="008"){
               window.location.href = "/admin/login.html";
             }
             this.crowFundingUserListData=res.data.users;
         }.bind(this))
      },
      filters:{
    
        formatData:function(key){
          return formatDate(key)
        }
      },
      methods:{
         getUrlParam:function(paraName) {
    　　　　var url = document.location.toString();
    　　　　var arrObj = url.split("?");
            if (arrObj.length > 1) {
    　　　　　　var arrPara = arrObj[1].split("&");
    　　　　　　var arr;

    　　　　　　for (var i = 0; i < arrPara.length; i++) {
    　　　　　　　　arr = arrPara[i].split("=");

    　　　　　　　　if (arr != null && arr[0] == paraName) {
    　　　　　　　　　　return arr[1];
    　　　　　　　　}
    　　　　　　}
    　　　　　　return "";
    　　　　}
    　　　　else {
    　　　　　　return "";
    　　　　}
    　　　　
    　　 }
      }

      
    })
  </script>
</html>